home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre3.z / postgre3 / src / lib / H / tmp / pmod.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  2.3 KB  |  99 lines

  1. /*
  2.  * pmod.h --
  3.  *    POSTGRES processing mode definitions.
  4.  *
  5.  * Description:
  6.  *    There are four processing modes in POSTGRES.  They are NoProcessing
  7.  * or "none," BootstrapProcessing or "bootstrap," InitProcessing or
  8.  * "initialization," and NormalProcessing or "normal."
  9.  *
  10.  *    If a POSTGRES binary is in normal mode, then all code may be executed
  11.  * normally.  In the none mode, only bookkeeping code may be called.  In
  12.  * particular, access method calls may not occur in this mode since the
  13.  * execution state is outside a transaction.
  14.  *
  15.  *    The final two processing modes are used during special times.  When the
  16.  * system state indicates bootstrap processing, transactions are all given
  17.  * transaction id "one" and are consequently guarenteed to commit.  This mode
  18.  * is used during the initial generation of template databases.
  19.  *
  20.  * Finally, the execution state is in initialization mode until all normal
  21.  * initialization is complete.  Some code behaves differently when executed in
  22.  * this mode to enable system bootstrapping.
  23.  */
  24.  
  25. #ifndef    PModIncluded        /* Include this file only once */
  26. #define PModIncluded    1
  27.  
  28. /*
  29.  * Identification:
  30.  */
  31. #define PMOD_H    "$Header: /private/postgres/src/lib/H/tmp/RCS/pmod.h,v 1.5 1990/08/17 08:54:51 cimarron Exp $"
  32.  
  33. #include "tmp/c.h"
  34.  
  35. typedef enum ProcessingMode {
  36.     NoProcessing,        /* "nothing" can be done */
  37.     BootstrapProcessing,    /* bootstrap creation of template database */
  38.     InitProcessing,        /* initializing system */
  39.     NormalProcessing,    /* normal processing */
  40. } ProcessingMode;
  41.  
  42. /*
  43.  * IsNoProcessingMode --
  44.  *    True iff processing mode is NoProcessing.
  45.  */
  46. extern
  47. bool
  48. IsNoProcessingMode ARGS((
  49.     void
  50. ));
  51.  
  52. /*
  53.  * IsBootstrapProcessingMode --
  54.  *    True iff processing mode is BootstrapProcessing.
  55.  */
  56. extern
  57. bool
  58. IsBootstrapProcessingMode ARGS((
  59.     void
  60. ));
  61.  
  62. /*
  63.  * IsInitProcessingMode --
  64.  *    True iff processing mode is InitProcessing.
  65.  */
  66. extern
  67. bool
  68. IsInitProcessingMode ARGS((
  69.     void
  70. ));
  71.  
  72. /*
  73.  * IsNormalProcessingMode --
  74.  *    True iff processing mode is NormalProcessing.
  75.  */
  76. extern
  77. bool
  78. IsNormalProcessingMode ARGS((
  79.     void
  80. ));
  81.  
  82. /*
  83.  * SetProcessingMode --
  84.  *    Sets mode of processing as specified.
  85.  *
  86.  * Exceptions:
  87.  *    BadArg if called with invalid mode.
  88.  *
  89.  * Note:
  90.  *    Mode is NoProcessing before the first time this is called.
  91.  */
  92. extern
  93. void
  94. SetProcessingMode ARGS((
  95.     ProcessingMode    mode
  96. ));
  97.  
  98. #endif    /* !defined(PModIncluded) */
  99.